$(document).ready(function(e){
   
   
   $('.commentEnter').live("click",function(event){
        var flag_validate = validateForm('reply',$(this).closest('form').get(0));
   })
   
   
   //accept friend request
   
   $('.accept-request').live("click",function(event){
       event.preventDefault();
       var msg = "";
       //$(this).closest('.item').mask("Loading..");
       //console.log($(this).closest('.item'));
       var _this = $(this);
       $.ajax({
           url:$(this).data("url"),
           async:"false",
           dataType:"json",
           success:function(data){
               msg = data.message;
               //console.log(msg);
               _this.closest('.item').unmask();
                _this.closest(".item").html(msg);
           }
           
       })
       
       
   })
 
   
   //fancybox
   $('.fancybox').fancybox({
       afterLoad :function(data){
           $('.im-content').mask("Loading..");
           inboxUpdate();
           outboxUpdate();
           $('.im-content').unmask();
       }
   });

    
   //jquery select
   /***********
    * IMPORTANT:- clasToggleOpen and classHolderOpen doesnot works simultaneously. use one at a time. if you are using classToggleOpen
    * please dont use classHolderOpen that time. this is an edit applied by DaD for custom use.
    */
//   $("select.select").selectbox({
//       classHolder:"radius f-dropdown select",
//       classHolderOpen:"opened",//added by DaD and not found in orginal plugin
//       classSelector:"blu",
//       classToggle:"arrow",
//       effect: "slide",
//       classOptions:"dropdown",
//       classToggleOpen:"opened"
//    });
    
});

